<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script type="text/javascript" src="../js/vue.js"></script>
</head>
<style>
</style>
<body>
<!-- 容器 -->
<div id="root">
    <school></school>
    <student></student>
    <helloa></helloa>
</div>
<script type="text/javascript">
const school=Vue.extend({
    name:'zc',
    template:`
        <div>
            <h1>{{name}}</h1>
            <p>{{address}}</p>
        </div>
    `,
    data(){
        return{
            name:'中英文学校',
            address:'河南省',
        }
    }
})
const student=Vue.extend({
    template:`
        <div>
      <h1>{{name}}</h1>
      <p>{{age}}</p>
        </div>
    `,
    data(){
        return{
            name:'张三',
            age:20,
        }
    }
})
const helloa=Vue.extend({
    template:`
        <div>
            <h1>Hello World</h1>
        </div>`,
    data(){
        return{
        }
    }
})
Vue.component('helloa',helloa)

new Vue({
    el:'#root',
    components:{
        school,
        student,
    }
})
</script>
</body>
</html>